package chapter7;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.CharArrayReader;
import java.io.CharArrayWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.Writer;

public class StringBuilderTest {
	
	public static void main(String[] args) throws IOException{
		
		Writer wr = new CharArrayWriter();
		
		BufferedWriter bw = new BufferedWriter(wr);
		
		InputStream is = System.in;
		
		Reader rr = new InputStreamReader(is);
		
		BufferedReader br = new BufferedReader(rr);
		
		int data = -1;
		
		StringBuilder sb = new StringBuilder();
		
		while((data=br.read())!=-1){
			
			sb.append((char)data);
		}
		System.out.println(sb);
		
		wr.close();
		
		rr.close();
	}
}
